<template>
  <div class="panel">
    <div class="data-grid">
      <div class="data-item">
        <div class="value">878</div>
        <div class="label-unit">
          <div class="label">总种植面积</div>
          <div class="unit">亩</div>
        </div>
      </div>
      <div class="data-item">
        <div class="value">6</div>
        <div class="label-unit">
          <div class="label">作物品种</div>
          <div class="unit">种</div>
        </div>
      </div>
      <div class="data-item">
        <div class="value">37</div>
        <div class="label-unit">
          <div class="label">监测设备</div>
          <div class="unit">台</div>
        </div>
      </div>
      <div class="data-item">
        <div class="value">97</div>
        <div class="label-unit">
          <div class="label">作物健康率</div>
          <div class="unit">%</div>
        </div>
      </div>
      <div class="data-item">
        <div class="value">602.4</div>
        <div class="label-unit">
          <div class="label">预计产量</div>
          <div class="unit">吨</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 组件逻辑
</script>

<style scoped>
.panel {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  width: 100%;
  padding: 0 24px;
}

.data-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 18px;
  transition: all 0.3s ease;
}

.data-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid rgba(51, 255, 208, 0.3);
  border-radius: 10px;
  box-shadow:
    0 0 8px rgba(51, 255, 208, 0.3),
    inset 0 0 8px rgba(51, 255, 208, 0.3);
}

.data-item::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 1px solid transparent;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(51, 255, 208, 0.1) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(0deg, rgba(51, 255, 208, 0.1) 1px, transparent 1px) 0 0 / 12px 12px;
  mask: linear-gradient(90deg, transparent 0%, #fff 10%, #fff 90%, transparent 100%);
  -webkit-mask: linear-gradient(90deg, transparent 0%, #fff 10%, #fff 90%, transparent 100%);
}

.data-item:hover::before {
  border-color: rgba(51, 255, 208, 0.5);
  box-shadow:
    0 0 12px rgba(51, 255, 208, 0.5),
    inset 0 0 12px rgba(51, 255, 208, 0.5);
}

.value {
  font-size: 42px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5),
               0 0 12px rgba(255, 255, 255, 0.3);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.label-unit {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.label {
  font-size: 16px;
  color: #33ffd0;
}

.unit {
  font-size: 16px;
  color: rgba(51, 255, 208, 0.8);
}
</style>
